package top.superflow.core.pool

import top.superflow.core.control.Controllable
import top.superflow.core.pool.config.PoolConfig
import top.superflow.core.statis.Metrizable

import scala.concurrent.Future

trait PoolManager[PC <: PoolConfig, T] extends Controllable {
  
  def load(configs : List[PC]) : Future[Metrizable[_]]
  
  def hotApplyPool(config : PC) : Future[Metrizable[_]]
  
  def getPool(poolKey : String) : Future[Pool[PC, T]]
  
  def generatePoolKey (config : PC) : String
  
  def createPool(config : PC) : Boolean
  
  
}